<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- | This is where we define a mapping from Uniques to their associated</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- known-key Names for things associated with tuples and sums. We use this</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- mapping while deserializing known-key Names in interface file symbol tables,</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- which are encoded as their Unique. See Note [Symbol table representation of</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- names] for details.</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Builtin.Uniques</span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="hs-comment">-- * Looking up known-key names</span></span><span>
</span><span id="line-12"></span><span>      </span><span class="annot"><a href="GHC.Builtin.Uniques.html#knownUniqueName"><span class="hs-identifier">knownUniqueName</span></a></span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span>      </span><span class="annot"><span class="hs-comment">-- * Getting the 'Unique's of 'Name's</span></span><span>
</span><span id="line-15"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Anonymous sums</span></span><span>
</span><span id="line-16"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkSumTyConUnique"><span class="hs-identifier">mkSumTyConUnique</span></a></span><span>
</span><span id="line-17"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkSumDataConUnique"><span class="hs-identifier">mkSumDataConUnique</span></a></span><span>
</span><span id="line-18"></span><span>      </span><span class="annot"><span class="hs-comment">-- ** Tuples</span></span><span>
</span><span id="line-19"></span><span>      </span><span class="annot"><span class="hs-comment">-- *** Vanilla</span></span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkTupleTyConUnique"><span class="hs-identifier">mkTupleTyConUnique</span></a></span><span>
</span><span id="line-21"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkTupleDataConUnique"><span class="hs-identifier">mkTupleDataConUnique</span></a></span><span>
</span><span id="line-22"></span><span>      </span><span class="annot"><span class="hs-comment">-- *** Constraint</span></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkCTupleTyConUnique"><span class="hs-identifier">mkCTupleTyConUnique</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkCTupleDataConUnique"><span class="hs-identifier">mkCTupleDataConUnique</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-comment">-- | Get the 'Name' associated with a known-key 'Unique'.</span><span>
</span><span id="line-45"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#knownUniqueName"><span class="hs-identifier hs-type">knownUniqueName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-46"></span><span id="knownUniqueName"><span class="annot"><span class="annottext">knownUniqueName :: Unique -&gt; Maybe Name
</span><a href="GHC.Builtin.Uniques.html#knownUniqueName"><span class="hs-identifier hs-var hs-var">knownUniqueName</span></a></span></span><span> </span><span id="local-6989586621680931076"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680931076"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680931075"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-48"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'z'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getUnboxedSumName"><span class="hs-identifier hs-var">getUnboxedSumName</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-49"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'4'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getTupleTyConName"><span class="hs-identifier hs-var">getTupleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-50"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'5'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getTupleTyConName"><span class="hs-identifier hs-var">getTupleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Unboxed"><span class="hs-identifier hs-var">Unboxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-51"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'7'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getTupleDataConName"><span class="hs-identifier hs-var">getTupleDataConName</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-52"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'8'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getTupleDataConName"><span class="hs-identifier hs-var">getTupleDataConName</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Unboxed"><span class="hs-identifier hs-var">Unboxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-53"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'k'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getCTupleTyConName"><span class="hs-identifier hs-var">getCTupleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-54"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'m'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Maybe Name) -&gt; Name -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getCTupleDataConUnique"><span class="hs-identifier hs-var">getCTupleDataConUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-55"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Name
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-56"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-57"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680931075"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680931075"><span class="hs-identifier hs-var">tag</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680931073"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931073"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; (Char, Int)
</span><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier hs-var">unpkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680931076"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- Anonymous sums</span><span>
</span><span id="line-61"></span><span class="hs-comment">--</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- Sum arities start from 2. The encoding is a bit funny: we break up the</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- integral part into bitfields for the arity, an alternative index (which is</span><span>
</span><span id="line-64"></span><span class="hs-comment">-- taken to be 0xff in the case of the TyCon), and, in the case of a datacon, a</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- tag (used to identify the sum's TypeRep binding).</span><span>
</span><span id="line-66"></span><span class="hs-comment">--</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- This layout is chosen to remain compatible with the usual unique allocation</span><span>
</span><span id="line-68"></span><span class="hs-comment">-- for wired-in data constructors described in GHC.Types.Unique</span><span>
</span><span id="line-69"></span><span class="hs-comment">--</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- TyCon for sum of arity k:</span><span>
</span><span id="line-71"></span><span class="hs-comment">--   00000000 kkkkkkkk 11111100</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- TypeRep of TyCon for sum of arity k:</span><span>
</span><span id="line-74"></span><span class="hs-comment">--   00000000 kkkkkkkk 11111101</span><span>
</span><span id="line-75"></span><span class="hs-comment">--</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- DataCon for sum of arity k and alternative n (zero-based):</span><span>
</span><span id="line-77"></span><span class="hs-comment">--   00000000 kkkkkkkk nnnnnn00</span><span>
</span><span id="line-78"></span><span class="hs-comment">--</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- TypeRep for sum DataCon of arity k and alternative n (zero-based):</span><span>
</span><span id="line-80"></span><span class="hs-comment">--   00000000 kkkkkkkk nnnnnn10</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkSumTyConUnique"><span class="hs-identifier hs-type">mkSumTyConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-83"></span><span id="mkSumTyConUnique"><span class="annot"><span class="annottext">mkSumTyConUnique :: Int -&gt; Unique
</span><a href="GHC.Builtin.Uniques.html#mkSumTyConUnique"><span class="hs-identifier hs-var hs-var">mkSumTyConUnique</span></a></span></span><span> </span><span id="local-6989586621680931064"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931064"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span class="hs-identifier">arity</span><span> </span><span class="hs-operator">&lt;</span><span> </span><span class="hs-number">0x3f</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- 0x3f since we only have 6 bits to encode the</span><span>
</span><span id="line-85"></span><span>                         </span><span class="hs-comment">-- alternative</span><span>
</span><span id="line-86"></span><span>    </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'z'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931064"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xfc</span></span><span class="hs-special">)</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkSumDataConUnique"><span class="hs-identifier hs-type">mkSumDataConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#ConTagZ"><span class="hs-identifier hs-type">ConTagZ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-89"></span><span id="mkSumDataConUnique"><span class="annot"><span class="annottext">mkSumDataConUnique :: Int -&gt; Int -&gt; Unique
</span><a href="GHC.Builtin.Uniques.html#mkSumDataConUnique"><span class="hs-identifier hs-var hs-var">mkSumDataConUnique</span></a></span></span><span> </span><span id="local-6989586621680931054"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931054"><span class="hs-identifier hs-var">alt</span></a></span></span><span> </span><span id="local-6989586621680931053"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931053"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-90"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931054"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931053"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-91"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Unique
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mkSumDataConUnique: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931054"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &gt;= &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931053"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'z'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931053"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931054"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">{- skip the tycon -}</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#getUnboxedSumName"><span class="hs-identifier hs-type">getUnboxedSumName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-96"></span><span id="getUnboxedSumName"><span class="annot"><span class="annottext">getUnboxedSumName :: Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getUnboxedSumName"><span class="hs-identifier hs-var hs-var">getUnboxedSumName</span></a></span></span><span> </span><span id="local-6989586621680931049"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931049"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931049"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xfc</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xfc</span></span><span>
</span><span id="line-98"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931047"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-99"></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Name) -&gt; TyCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; TyCon
</span><a href="GHC.Builtin.Types.html#sumTyCon"><span class="hs-identifier hs-var">sumTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931044"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-100"></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="#local-6989586621680931043"><span class="hs-identifier hs-var">getRep</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Name) -&gt; TyCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; TyCon
</span><a href="GHC.Builtin.Types.html#sumTyCon"><span class="hs-identifier hs-var">sumTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931044"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-101"></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Name
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getUnboxedSumName: invalid tag&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931047"><span class="hs-identifier hs-var">tag</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931047"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x0</span></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">(DataCon -&gt; Name) -&gt; DataCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; DataCon
</span><a href="GHC.Builtin.Types.html#sumDataCon"><span class="hs-identifier hs-var">sumDataCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931038"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931044"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931047"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x1</span></span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; Id -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Id
</span><a href="GHC.Core.DataCon.html#dataConWrapId"><span class="hs-identifier hs-var">dataConWrapId</span></a></span><span> </span><span class="annot"><span class="annottext">(DataCon -&gt; Id) -&gt; DataCon -&gt; Id
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; DataCon
</span><a href="GHC.Builtin.Types.html#sumDataCon"><span class="hs-identifier hs-var">sumDataCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931038"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931044"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931047"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x2</span></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="#local-6989586621680931043"><span class="hs-identifier hs-var">getRep</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Name) -&gt; TyCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#promoteDataCon"><span class="hs-identifier hs-var">promoteDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">(DataCon -&gt; TyCon) -&gt; DataCon -&gt; TyCon
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; DataCon
</span><a href="GHC.Builtin.Types.html#sumDataCon"><span class="hs-identifier hs-var">sumDataCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931038"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931044"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Name
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getUnboxedSumName&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931049"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-111"></span><span>    </span><span id="local-6989586621680931044"><span class="annot"><span class="annottext">arity :: Int
</span><a href="#local-6989586621680931044"><span class="hs-identifier hs-var hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931049"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>
</span><span id="line-112"></span><span>    </span><span id="local-6989586621680931038"><span class="annot"><span class="annottext">alt :: Int
</span><a href="#local-6989586621680931038"><span class="hs-identifier hs-var hs-var">alt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931049"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xfc</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-113"></span><span>    </span><span id="local-6989586621680931047"><span class="annot"><span class="annottext">tag :: Int
</span><a href="#local-6989586621680931047"><span class="hs-identifier hs-var hs-var">tag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931049"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-114"></span><span>    </span><span id="local-6989586621680931043"><span class="annot"><span class="annottext">getRep :: TyCon -&gt; Name
</span><a href="#local-6989586621680931043"><span class="hs-identifier hs-var hs-var">getRep</span></a></span></span><span> </span><span id="local-6989586621680931023"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680931023"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-115"></span><span>        </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name -&gt; Name
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Name
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getUnboxedSumName(getRep)&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680931023"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>        </span><span class="annot"><span class="annottext">(Maybe Name -&gt; Name) -&gt; Maybe Name -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Name
</span><a href="GHC.Core.TyCon.html#tyConRepName_maybe"><span class="hs-identifier hs-var">tyConRepName_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680931023"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- Note [Uniques for tuple type and data constructors]</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-120"></span><span class="hs-comment">--</span><span>
</span><span id="line-121"></span><span class="hs-comment">-- Wired-in type constructor keys occupy *two* slots:</span><span>
</span><span id="line-122"></span><span class="hs-comment">--    * u: the TyCon itself</span><span>
</span><span id="line-123"></span><span class="hs-comment">--    * u+1: the TyConRepName of the TyCon</span><span>
</span><span id="line-124"></span><span class="hs-comment">--</span><span>
</span><span id="line-125"></span><span class="hs-comment">-- Wired-in tuple data constructor keys occupy *three* slots:</span><span>
</span><span id="line-126"></span><span class="hs-comment">--    * u: the DataCon itself</span><span>
</span><span id="line-127"></span><span class="hs-comment">--    * u+1: its worker Id</span><span>
</span><span id="line-128"></span><span class="hs-comment">--    * u+2: the TyConRepName of the promoted TyCon</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- Constraint tuples</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkCTupleTyConUnique"><span class="hs-identifier hs-type">mkCTupleTyConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-134"></span><span id="mkCTupleTyConUnique"><span class="annot"><span class="annottext">mkCTupleTyConUnique :: Int -&gt; Unique
</span><a href="GHC.Builtin.Uniques.html#mkCTupleTyConUnique"><span class="hs-identifier hs-var hs-var">mkCTupleTyConUnique</span></a></span></span><span> </span><span id="local-6989586621680931020"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931020"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'k'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931020"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkCTupleDataConUnique"><span class="hs-identifier hs-type">mkCTupleDataConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-137"></span><span id="mkCTupleDataConUnique"><span class="annot"><span class="annottext">mkCTupleDataConUnique :: Int -&gt; Unique
</span><a href="GHC.Builtin.Uniques.html#mkCTupleDataConUnique"><span class="hs-identifier hs-var hs-var">mkCTupleDataConUnique</span></a></span></span><span> </span><span id="local-6989586621680931018"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931018"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'m'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931018"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#getCTupleTyConName"><span class="hs-identifier hs-type">getCTupleTyConName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-140"></span><span id="getCTupleTyConName"><span class="annot"><span class="annottext">getCTupleTyConName :: Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getCTupleTyConName"><span class="hs-identifier hs-var hs-var">getCTupleTyConName</span></a></span></span><span> </span><span id="local-6989586621680931017"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931017"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-141"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931017"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; (Int, Int)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="../../base/src/GHC.Real.html#divMod"><span class="hs-operator hs-var">`divMod`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-142"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680931015"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931015"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Types.html#cTupleTyConName"><span class="hs-identifier hs-var">cTupleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931015"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-143"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680931013"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931013"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name
</span><a href="GHC.Core.TyCon.html#mkPrelTyConRepName"><span class="hs-identifier hs-var">mkPrelTyConRepName</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name) -&gt; Name -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Types.html#cTupleTyConName"><span class="hs-identifier hs-var">cTupleTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931013"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-144"></span><span>      </span><span class="annot"><span class="annottext">(Int, Int)
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getCTupleTyConName: impossible&quot;</span></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#getCTupleDataConUnique"><span class="hs-identifier hs-type">getCTupleDataConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-147"></span><span id="getCTupleDataConUnique"><span class="annot"><span class="annottext">getCTupleDataConUnique :: Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getCTupleDataConUnique"><span class="hs-identifier hs-var hs-var">getCTupleDataConUnique</span></a></span></span><span> </span><span id="local-6989586621680931011"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931011"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-148"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931011"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; (Int, Int)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="../../base/src/GHC.Real.html#divMod"><span class="hs-operator hs-var">`divMod`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-149"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680931010"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931010"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Types.html#cTupleDataConName"><span class="hs-identifier hs-var">cTupleDataConName</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931010"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-150"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680931008"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931008"><span class="hs-identifier hs-var">_arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getCTupleDataConName: no worker&quot;</span></span><span>
</span><span id="line-151"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680931007"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931007"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name
</span><a href="GHC.Core.TyCon.html#mkPrelTyConRepName"><span class="hs-identifier hs-var">mkPrelTyConRepName</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name) -&gt; Name -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Name
</span><a href="GHC.Builtin.Types.html#cTupleDataConName"><span class="hs-identifier hs-var">cTupleDataConName</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931007"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-152"></span><span>      </span><span class="annot"><span class="annottext">(Int, Int)
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getCTupleDataConName: impossible&quot;</span></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- Normal tuples</span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkTupleDataConUnique"><span class="hs-identifier hs-type">mkTupleDataConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Boxity"><span class="hs-identifier hs-type">Boxity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-158"></span><span id="mkTupleDataConUnique"><span class="annot"><span class="annottext">mkTupleDataConUnique :: Boxity -&gt; Int -&gt; Unique
</span><a href="GHC.Builtin.Uniques.html#mkTupleDataConUnique"><span class="hs-identifier hs-var hs-var">mkTupleDataConUnique</span></a></span></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span>          </span><span id="local-6989586621680931006"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931006"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'7'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931006"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-comment">-- may be used in C labels</span><span>
</span><span id="line-159"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkTupleDataConUnique"><span class="hs-identifier hs-var">mkTupleDataConUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Unboxed"><span class="hs-identifier hs-var">Unboxed</span></a></span><span>        </span><span id="local-6989586621680931005"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931005"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'8'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931005"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkTupleTyConUnique"><span class="hs-identifier hs-type">mkTupleTyConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Boxity"><span class="hs-identifier hs-type">Boxity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-162"></span><span id="mkTupleTyConUnique"><span class="annot"><span class="annottext">mkTupleTyConUnique :: Boxity -&gt; Int -&gt; Unique
</span><a href="GHC.Builtin.Uniques.html#mkTupleTyConUnique"><span class="hs-identifier hs-var hs-var">mkTupleTyConUnique</span></a></span></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span>           </span><span id="local-6989586621680931004"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931004"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'4'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931004"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-163"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#mkTupleTyConUnique"><span class="hs-identifier hs-var">mkTupleTyConUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Unboxed"><span class="hs-identifier hs-var">Unboxed</span></a></span><span>         </span><span id="local-6989586621680931003"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931003"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'5'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931003"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#getTupleTyConName"><span class="hs-identifier hs-type">getTupleTyConName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Boxity"><span class="hs-identifier hs-type">Boxity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-166"></span><span id="getTupleTyConName"><span class="annot"><span class="annottext">getTupleTyConName :: Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getTupleTyConName"><span class="hs-identifier hs-var hs-var">getTupleTyConName</span></a></span></span><span> </span><span id="local-6989586621680931002"><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680931002"><span class="hs-identifier hs-var">boxity</span></a></span></span><span> </span><span id="local-6989586621680931001"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931001"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-167"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931001"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; (Int, Int)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="../../base/src/GHC.Real.html#divMod"><span class="hs-operator hs-var">`divMod`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-168"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680931000"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931000"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Name) -&gt; TyCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; TyCon
</span><a href="GHC.Builtin.Types.html#tupleTyCon"><span class="hs-identifier hs-var">tupleTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680931002"><span class="hs-identifier hs-var">boxity</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680931000"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-169"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680930998"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930998"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name -&gt; Name
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getTupleTyConName&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>                    </span><span class="annot"><span class="annottext">(Maybe Name -&gt; Name) -&gt; Maybe Name -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Name
</span><a href="GHC.Core.TyCon.html#tyConRepName_maybe"><span class="hs-identifier hs-var">tyConRepName_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Maybe Name) -&gt; TyCon -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; TyCon
</span><a href="GHC.Builtin.Types.html#tupleTyCon"><span class="hs-identifier hs-var">tupleTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680931002"><span class="hs-identifier hs-var">boxity</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930998"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-171"></span><span>      </span><span class="annot"><span class="annottext">(Int, Int)
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getTupleTyConName: impossible&quot;</span></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="annot"><a href="GHC.Builtin.Uniques.html#getTupleDataConName"><span class="hs-identifier hs-type">getTupleDataConName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Boxity"><span class="hs-identifier hs-type">Boxity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-174"></span><span id="getTupleDataConName"><span class="annot"><span class="annottext">getTupleDataConName :: Boxity -&gt; Int -&gt; Name
</span><a href="GHC.Builtin.Uniques.html#getTupleDataConName"><span class="hs-identifier hs-var hs-var">getTupleDataConName</span></a></span></span><span> </span><span id="local-6989586621680930997"><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680930997"><span class="hs-identifier hs-var">boxity</span></a></span></span><span> </span><span id="local-6989586621680930996"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930996"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930996"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; (Int, Int)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="../../base/src/GHC.Real.html#divMod"><span class="hs-operator hs-var">`divMod`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-176"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680930995"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930995"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">(DataCon -&gt; Name) -&gt; DataCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; DataCon
</span><a href="GHC.Builtin.Types.html#tupleDataCon"><span class="hs-identifier hs-var">tupleDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680930997"><span class="hs-identifier hs-var">boxity</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930995"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-177"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680930993"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930993"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Name) -&gt; Id -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Id
</span><a href="GHC.Core.DataCon.html#dataConWorkId"><span class="hs-identifier hs-var">dataConWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">(DataCon -&gt; Id) -&gt; DataCon -&gt; Id
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; DataCon
</span><a href="GHC.Builtin.Types.html#tupleDataCon"><span class="hs-identifier hs-var">tupleDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680930997"><span class="hs-identifier hs-var">boxity</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930993"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-178"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680930990"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930990"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name -&gt; Name
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getTupleDataCon&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>                    </span><span class="annot"><span class="annottext">(Maybe Name -&gt; Name) -&gt; Maybe Name -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Name
</span><a href="GHC.Core.TyCon.html#tyConRepName_maybe"><span class="hs-identifier hs-var">tyConRepName_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Maybe Name) -&gt; TyCon -&gt; Maybe Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; TyCon
</span><a href="GHC.Builtin.Types.html#promotedTupleDataCon"><span class="hs-identifier hs-var">promotedTupleDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621680930997"><span class="hs-identifier hs-var">boxity</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680930990"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-180"></span><span>      </span><span class="annot"><span class="annottext">(Int, Int)
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Name
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getTupleDataConName: impossible&quot;</span></span><span>
</span><span id="line-181"></span></pre></body></html>